﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="StandardNemoBlogModule.ascx.cs" Inherits="blackhouse.NemoBlog.Web.StandardNemoBlogModule" %>
<%@ Register Namespace="blackhouse.WebNemo.Web.Controls" Assembly="blackhouse.WebNemo.Web" TagPrefix="blackhouse" %>
<%@ Import Namespace="blackhouse.NemoBlog.Web" %>
<div itemscope itemtype="http://schema.org/Blog">
    <asp:Panel runat="server" ID="pnlNemoBlog">
        <hgroup>
            <h1>
                <asp:Literal runat="server" ID="ltlBlogName"></asp:Literal>
            </h1>
            <h2>
                <asp:Literal runat="server" ID="ltlBlogSecondName"></asp:Literal></h2>
        </hgroup>
        <asp:Panel runat="server" ID="pnlActionPanel" Visible="false">
            <ul class="nemoblogadminmenu">
                <li>
                    <blackhouse:LinkToEdit ID="lteSettings" runat="server" GroupSysName="BLOG_SETTINGS" Text="Ustawienia" />
                </li>
                <li>
                    <blackhouse:LinkToEdit ID="lteAddPost" runat="server" GroupSysName="BLOG_POSTS" RecordId="0" OpenAsPopup="false" Text="Dodaj nowy post" />
                </li>
            </ul>
            <div class="cleaner"></div>
        </asp:Panel>
        <asp:Repeater runat="server" ID="rptPosts">
            <HeaderTemplate>
                <section class="nemoPostLists" itemscope itemprop="blogPosts" itemtype="http://schema.org/BlogPosting" id="nemoBlog">
            </HeaderTemplate>
            <ItemTemplate>
                <article class="shadow-after" data-postid="<%#Eval("Post.PostId") %>">
                    <h3><a href="<%#Eval("WellFormedUrl") %>" title="<%#Eval("Post.Title") %>" itemprop="name"><%#Eval("Post.Title") %></a></h3>
                    <div class="nemoPoPostData">
                        <a class="ico"></a>Opublikowano <span itemprop="dateCreated" datetime="<%#Eval("IsoPublishedDate") %>"><%#((Container.DataItem as DTNemoBlogPost).Post.IsPublished)? Eval("Post.PublishDate","{0:D}"):"***nie opublikowano***" %></span> przez: <span itemprop="author" rel="author"><%#Eval("PublisherName") %></span>
                        <asp:Repeater runat="server" ID="rptTags" DataSource='<%#Eval("Tags") %>' Visible='<%#(((int)Eval("Tags.Length"))>0) %>'>
                            <HeaderTemplate>
                                <ul class="nemoPostTags">
                            </HeaderTemplate>
                            <ItemTemplate>
                                <li><a href="<%#Eval("WellFormedUrl") %>" title="<%#Eval("Tag.Title") %>"><%#Eval("Tag.Name") %></a></li>
                            </ItemTemplate>
                            <FooterTemplate>
                                </ul>

                            </FooterTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="nemoPostLid" itemprop="description">
                        <%#Eval("Post.Lid") %>
                    </div>
                    <a href="<%#Eval("WellFormedUrl") %>" title="<%#Eval("Post.Title") %>" class="nemoPostSeeMore" itemprop="url">czytaj więcej</a>
                    <div class="cleaner"></div>
                </article>
            </ItemTemplate>
            <FooterTemplate></section></FooterTemplate>
        </asp:Repeater>
        <asp:HyperLink runat="server" ID="seeMoreLink">zobacz więcej</asp:HyperLink>
        <asp:Panel runat="server" ID="pnlNoPostsFind" CssClass="nemoNoPosts">
            Aktualnie nie znajdziesz tutaj nic ciekawego ;(
        <asp:Panel runat="server" ID="pnlAdminAddLink">
            ... ale to jest dobry czas, aby
                <blackhouse:LinkToEdit ID="lteAddPostOnNoContent" runat="server" GroupSysName="BLOG_POSTS" Text="dodać nowy post" />
        </asp:Panel>
        </asp:Panel>
    </asp:Panel>
</div>
